# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pocsuite
pkgver=430.877d1b1
pkgrel=4
groups=('blackarch' 'blackarch-exploitation')
pkgdesc='An open-sourced remote vulnerability testing framework developed by the Knownsec Security Team.'
url='https://github.com/knownsec/Pocsuite'
arch=('any')
depends=('python2' 'python2-pyopenssl' 'python2-lxml' 'python2-requests'
         'python2-setuptools')
makedepends=('git' 'python2-setuptools')
license=('GPL')
source=("$pkgname::git+https://github.com/knownsec/Pocsuite.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python2 setup.py build
}

package() {
  cd $pkgname

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  sed -i 's|python|python2|' \
    "$pkgdir/usr/lib/python2.7/site-packages/pocsuite/thirdparty/pyparsing/setup.py"
}

